home *** CD-ROM | disk | FTP | other *** search
/ PC World 2006 February / PCWorld_2006-02_cd.bin / software / vyzkuste / tnt / tnt.exe / {app} / plugins / Desktop Wallpaper Pos.ttp < prev    next >
INI File  |  2005-03-15  |  2KB  |  71 lines

  1. [SETTINGS]
  2. category=Windows Tweaks::Desktop::Change the Position of the Desktop Wallpaper 
  3. Caption=Change the Position of the Desktop Wallpaper 
  4. version=1.0
  5. #=Use this tweak to specify the position of your current wallpaper. This can be used to move the picture anywhere on your screen.
  6. #=
  7. #=\nTo reset the position to default, clear both fields to zeroes and apply.
  8. Author=
  9.  
  10.  
  11. [INTERFACE]
  12. TYPE=multi
  13. type0=spin
  14. style0=-1024,1024
  15. Text0=Horizontal Offset (pixels)
  16. type1=spin
  17. Text1=Vertical Offset (pixels)
  18. style1=-1024,1024
  19.  
  20. [EXPORT]
  21. val0="HKCU\Control Panel\Desktop\WallpaperOriginX"
  22. val1="HKCU\Control Panel\Desktop\WallpaperOriginY"
  23.  
  24. [SCRIPT]
  25. Dim strKey,str1,str2
  26. strKey="HKCU\Control Panel\Desktop\"
  27. str1="WallpaperOriginX"
  28. str2="WallpaperOriginY"
  29.  
  30. Sub OnInit() 
  31. Dim s,i
  32.  i=RegReadValue(strKey & str1)
  33.  if IsEmpty(i) then
  34.   SetItemText 0,""
  35.  else
  36.   SetItemText 0,i
  37.  end if
  38.  i=RegReadValue(strKey & str2)
  39.  if IsEmpty(i) then
  40.   SetItemText 1,""
  41.  else
  42.   SetItemText 1,i
  43.  end if
  44.  
  45. End Sub
  46.  
  47. Sub OnApply(x,y)
  48. Dim s
  49.  s=GetItemText(0)
  50.  if len(s)=0 then 
  51.   s=RegReadValue(strKey & str1)
  52.   if IsEmpty(s)=false then
  53.    Call RegDeleteVal(strKey & str1)
  54.   end if
  55.  else
  56.   Call RegWriteValue(strKey & str1,s,1)
  57.  end if
  58.  
  59.  s=GetItemText(1)
  60.  if len(s)=0 then 
  61.   s=RegReadValue(strKey & str2)
  62.   if IsEmpty(s)=false then
  63.    Call RegDeleteVal(strKey & str2)
  64.   end if
  65.  else
  66.   Call RegWriteValue(strKey & str2,s,1)
  67.  end if
  68.  Call Restart
  69.  Call NotifySettingChange(0)
  70. End Sub
  71.